projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae4abbc
)
gtkbox: fix positioning of center widget
author
Paolo Borelli
<pborelli@gnome.org>
Mon, 17 Feb 2014 22:19:10 +0000
(23:19 +0100)
committer
Paolo Borelli
<pborelli@gnome.org>
Mon, 17 Feb 2014 22:23:04 +0000
(23:23 +0100)
gtk/gtkbox.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbox.c
b/gtk/gtkbox.c
index 19bb0f96e6e18233826b299e0ffd6de58ae2179e..062008130f017f4d150b60af907d74082ed0fe21 100644
(file)
--- a/
gtk/gtkbox.c
+++ b/
gtk/gtkbox.c
@@
-1137,7
+1137,11
@@
gtk_box_size_allocate_with_center (GtkWidget *widget,
}
/* Allocate the center widget */
- center_pos = (box_size - center_size) / 2;
+ if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+ center_pos = allocation->x + (box_size - center_size) / 2;
+ else
+ center_pos = allocation->y + (box_size - center_size) / 2;
+
if (center_pos < side[GTK_PACK_START])
center_pos = side[GTK_PACK_START];
else if (center_pos + center_size > side[GTK_PACK_END])